package com.accompany.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author DC
 * @since 2024-12-26
 */
@Data
@Schema(name = "Order对象", description = "订单表")
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(name = "orderNo", description = "订单编号")
    private String orderNo;

    @Schema(name = "userId", description = "用户ID")
    private Long userId;

    @Schema(name = "masterId", description = "大神ID")
    private Long masterId;

    @Schema(name = "gameId", description = "游戏ID")
    private Long gameId;

    @Schema(name = "hours", description = "预约时长(小时)")
    private Integer hours;

    @Schema(name = "amount", description = "订单金额")
    private BigDecimal amount;

    @Schema(name = "status", description = "订单状态 0:待支付 1:待接单 2:进行中 3:已完成 4:已取消")
    private Byte status;

    @Schema(name = "startTime", description = "开始时间")
    private LocalDateTime startTime;

    @Schema(name = "endTime", description = "结束时间")
    private LocalDateTime endTime;

    @Schema(name = "cancelReason", description = "取消原因")
    private String cancelReason;

    @Schema(name = "rating", description = "评分")
    private BigDecimal rating;

    @Schema(name = "comment", description = "评价内容")
    private String comment;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;
}
